package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-05-15
 * Time: 19:24
 */
public class Cat extends Animal {


    public Cat(String name, int age) {
        super(name,age);
        this.name = name;
        this.age = age;
        System.out.println("我是子类构造方法");
    }

      /*
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }*/

    public void mimi() {

        System.out.println(this.name + " 正在喵喵叫。。。");

    }

    /*@Override
    public String toString() {
        return "Cat{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }*/

    /*public void eat() {
        System.out.println("正在吃饭。。。");
    }*/

    public static void main(String[] args) {
        Animal animal = new Cat("mimi", 1);
    }
}
